package com.xiezc.dht.service;

import java.io.IOException;
import java.net.InetSocketAddress;

import com.xiezc.dht.message.Message;
import com.xiezc.dht.message.MessageBuild;
import com.xiezc.dht.util.Const;

/**
 * @author wb-xzc291800
 * @date 2018/05/17 14:34
 */
public class MainThread {

    public static void main(String[] args) {
        CoreService coreService = new CoreService(Const.worlkPort, Const.sendCache, Const.recvCache);

        //开始接收
        coreService.receviceStart();
        //开始发送
        coreService.sendStart();
        //开始处理接收的消息
        coreService.dealMsgStart();
        //定时任务
        coreService.timeStart();
    }


}
